<template>
  <div class="stat-card">
    <div class="stat-title">
      <i :class="icon"></i>
      {{ title }}
    </div>
    <div class="stat-value">{{ value }}</div>
    <div class="stat-trend" :class="{down: trendType === 'down'}">
      <i :class="trendType === 'down' ? 'fas fa-arrow-down' : 'fas fa-arrow-up'"></i>
      {{ trend }}
    </div>
  </div>
</template>
<script setup lang="ts">
const props = defineProps({
  icon: { type: String, required: true },
  title: { type: String, required: true },
  value: { type: [String, Number], required: true },
  trend: { type: String, required: true },
  trendType: { type: String, default: 'up' }
})
</script>
<script lang="ts">
export default {}
</script>
<style scoped>
.stat-card {
  background: #fff;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
}
.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
}
.stat-title {
  font-size: 14px;
  color: #6c757d;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #0d1b2a;
  margin-bottom: 5px;
}
.stat-trend {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: #198754;
}
.stat-trend.down {
  color: #dc3545;
}
</style> 